<template>
  <h2>vue2与vue3的生命周期对比
  </h2>
  <button @click="show=!show">切换</button>
  <hr/>
  <child v-if="show" />
</template>

<script>
import child from './component/child'
export default {
  name: 'App',
  components: {
    child
  },
  data(){
    return{
      show:false
    }
  }

}
</script>

<style>
</style>
